<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
  </head>
  <body>
    <script>
      const _searchStrIndexOf = (str, target) => {
        // 补全代码
        /*
          请补全JavaScript代码，该函数接受两个参数分别为字符串、子字符串，要求返回子字符串在字符串中出现的频次
        */
        var countTarge = str.split(target).filter(item => item)
        return countTarge.length
      }

      console.log(_searchStrIndexOf('sdffgfdfdgfdw', 'fd'))
    </script>
  </body>
</html>
